<?php
include_once 'quizzes/Business/survey_result_service.php';
try{
$survey_result =survey_result_service::get_survey_result_by_mark($survey_id,$mark);
if($survey_result){
	$content=$content.stripslashes($survey_result->survey_result_content);
	$counter  =  new counter($survey_id);
	$content = $content.$counter->build_gui();
	$content = $content.'<hr/>';
	$content = $content.'<fb:fbml>';
	
 
// Prepare the invitation text that all invited users will receive.  
$send_content='
<fb:name uid="'.$me['id'].'" firstnameonly="false" shownetwork="false"/> muon moi ban cung thu game nay!';

$content.='<fb:request-form action="http://apps.facebook.com/'.$facebook_app->app_name.'" method="POST" invite="false" type="Favorite Games" content="'.htmlentities($send_content).'">  
    <fb:multi-friend-selector max="20" actiontext="Chia xẻ với bạn bè!" showborder="true" rows="5">
	</fb:request-form>';
	$content.='</fb:fbml>';
	
}else{
	$content=$content.' Có lỗi phát sinh!';
}
}catch(Exception $e){
	print_r($e);
}
?>
